package com.zwps.biz.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum IdentifyTypeEnum {
    HUMAN_INTRUSION(1, "人员入侵"),
    FLOATING_OBJECT(2, "水面漂浮物"),
    MINING_VESSEL(3, "非法采砂"),
    ENGINEERING_SHIP(4, "车辆入侵"),
    GARBAGE_DUMPING(5, "垃圾倾倒"),
    ILLEGAL_FISHING(6, "违法捕捞"),
    UNKNOWN(0, "未知类型");

    private final int type;
    private final String description;

    public static String getDescriptionByType(int type) {
        for (IdentifyTypeEnum identifyTypeEnum : values()) {
            if (identifyTypeEnum.getType() == type) {
                return identifyTypeEnum.getDescription();
            }
        }
        return UNKNOWN.getDescription();
    }
}
